#include <crtdbg.h>
#include <Windows.h>

#include "main/Application.h"
#include "main/Globals.h"

#include "scenes/emitterScene/EmitterScene.h"
#include "scenes/layerScene/LayerScene.h"
#include "scenes/sphereScene/SphereScene.h"
#include "scenes/swarmScene/SwarmScene.h"

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, PSTR, int) {
    // Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
    _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif
    
    Globals::gApp = hInstance;
	Globals::init();
	
	Application app(new EmitterScene());
	app.execute();

	Globals::destroy();
}